#include "LSM.hh"
#include "NeuronType.hh"

#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
  // Regular Spiking neurons
  std::string rs_name("RS");
  int num_rs_params = 7;
  float rs_params[] = { 0.02, 0.20, -61.3, 6.5, -13.0, -65.0, 1.0 };

  IzhikevichNeuronType * rs = new IzhikevichNeuronType(rs_name, num_rs_params, rs_params);
  rs->setWeights(0.3, 0.7);

  // Fast Spiking neurons
  std::string fs_name("FS");
  int num_fs_params = 7;
  float fs_params[] = { 0.02, 0.25, -65.0, 2, -13.0, -65.0, 0.0 };

  IzhikevichNeuronType * fs = new IzhikevichNeuronType(fs_name, num_fs_params, fs_params);
  fs->setWeights(-0.5, -0.4);

  LSM lsm(20,10,5);

  lsm.addNeuronType(rs, 0.8);
  lsm.addNeuronType(fs, 1.0);

  lsm.init();

  for(int i = 0; i < 10000; i++) {    
    std::vector<unsigned> fired = lsm.step();
    
    if(0) { //(i % 1000) == 0) {
      for(int j = 0; j < fired.size(); j++)
	std::cout << fired[j] << " ";
      std::cout << std::endl;
    }
      

  }


}
